﻿using Dpy.MathWinRT.Geometry.Geometry2D;
using System;
using System.Linq;

namespace BouncingBallGame.ViewModels.ShapeViewModels
{
    public class LineSegmentViewModel : ShapeViewModelBase
    {
        private readonly LineSegment2D segment;

        public double X1
        {
            get
            {
                return this.segment[0].X;
            }
        }

        public double X2
        {
            get
            {
                return this.segment[1].X;
            }
        }

        public double Y1
        {
            get
            {
                return this.segment[0].Y;
            }
        }

        public double Y2
        {
            get
            {
                return this.segment[1].Y;
            }
        }

        public override double X { get; set; }

        public override double Y { get; set; }

        public LineSegmentViewModel(double x1, double y1, double x2, double y2)
        {
            this.segment = new LineSegment2D(new Vector2D(x1, y1), new Vector2D(x2, y2));
        }

        public LineSegmentViewModel(LineSegment2D segment)
        {
            this.segment = segment;
        }

        public override void Scale(double scaleFactor)
        {
            throw new NotImplementedException();
        }

        public override void FitInSize(double maxWidth, double maxHeight)
        {
            throw new NotImplementedException();
        }
    }
}
